package com.qf.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 客户端  ConfigClientController c = new ConfigClientController();
 *         c.setVersion
 * @author lixu
 */
@RestController
@RefreshScope //刷新域 application
public class ConfigClientController {
    // 更新版本号
    @Value("${version}")
    private String version;
    /**
     * 是否 动态变更配置文件的内容   gitee
     */
    @GetMapping("/config")
    public String config(){

        return "version:" + version;

    }
}
